package com.reggie.common.exception;

import com.reggie.common.enums.ResponseCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 业务异常
 * * 规范的用户行为产生的异常
 * * 不规范的用户行为操作产生的异常
 */
@Getter
@Setter
@ToString
public class ReggieException extends RuntimeException {
    private ResponseCode code;

    public ReggieException(ResponseCode code, String message) {
        super(message);
        this.code = code;
    }

    public ReggieException(ResponseCode code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }


}
